<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>js</title>
</head>
<body>
       <script>
  /*       var age = 68;
         var info;
         if(age<18) {
            info='未成年人';
         } else if(age>=20 && age<=35){
            info='青年人';
         } else if (age>=40 && age<=60){
            info='中年人';
         } else if (age>=65 && age<100){
            info ='老年人';
         }
         console.log(info);*/

         var week = 18;
         switch(week){
            case 1:
            console.log('周一');
            break;
            case 2:
            console.log('周二');
            break;
            case 3:
            console.log('周三');
            break;
            case 4:
            console .log('周四');
            break;
            case 5:
            console.log('周五');
            break;
            case 6:
            console.log('周六');
            break;
            case 7:
            console.log('周天');
            break;
            default:
            console.log('请输入正确的星期');
         }

         var week = 1;
         var info;
         switch(week) {
            case 1:
            info ='周一';
            break;
            case 2:
            info = '周二';
            break;
            case 3:
            info='周三';
            break;
            case 4:
            info='周四';
            break;
            case 5:
            info='周五';
            break;
            case 6:
            info='周六';
            break;
            case 7:
            info='周天';
            break;
            default:
            info='请输入一个正确的数字';
         }
         document.write(info)

/*         var a = 5;
         var b="test";
         var c='5';
         console.log(a+a);
         console.log(a+b);
         console.log(a+c);
         console.log(b+c);*/
/*
       var arr=[1,8,2,9,11,5];
       function getmax(abc){
         abc.sort(function(a,b){
            return a-b;
         });
         return arr[arr.length-1]
       }
       console.log(getmax(arr));*/

  /*    var age = 26;
      var info;
      if(age<18) {
        info='未成年';
      } else{
        info='成年人';
      }
      console.log(info);*/
  //     a= 213;
  //     function abc(){
  //     b=123;
  //      console.log(a);
  // }
  //   abc()
  // console.log(b);
  
   // var foo={};
   // foo.method = function(){
   //  function test() {
   //      console.log(this);
   //  }
   //  test();
   // }
   // foo.method();
   
    </script>
</body>
</html>